package com.jpx.jxcbiz.mapper;

import com.jpx.jxcbiz.entity.TCustomerReturnList;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Mht
 * @since 2020-02-24
 */
public interface TCustomerReturnListMapper extends BaseMapper<TCustomerReturnList> {

    /**
     * 退货订单列表查询以及搜索
     * @param tCustomerReturnList
     * @return
     */
    List<TCustomerReturnList> getGoodsRetureList(TCustomerReturnList tCustomerReturnList);

    /**
     * 根据退货订单Id查询具体商品信息
     */
    List<TCustomerReturnList> getReturnGoodsById(@Param("id")Integer id);

    /**
     * 根据退货订单Id删除订单
     * @param id
     * @return
     */
    boolean deleteReturnById(@Param("id")int id);

    /**
     * 根据退货订单Id删除退货的具体商品
     * @param id
     * @return
     */
    boolean deleteReturnGoodsById(@Param("id")int id);

    /**
     * 添加退货表
     * @param returnList
     */
    void insertReturnList(TCustomerReturnList returnList);
}
